package generator;

import java.awt.BorderLayout;
import java.awt.List;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;

import util.Configuration;

public class Gui extends JFrame {

	private static final long serialVersionUID = 6106582726297578641L;
	private JTextField nameFile;
	private JTextField configFile;
	private List startFiles;
	private List goalFiles;

	public Gui() {
		startFiles = new List();
		goalFiles = new List();
		this.setLayout(new BorderLayout());
		nameFile = new JTextField(15);
		configFile = new JTextField(15);
		configFile.setText(Configuration.CONFNAMESINIT);
		JPanel settings = new SettingsPanel(configFile, nameFile);
		JPanel data = new DataPanel(startFiles, goalFiles);
		JPanel generate = new GeneratePanel(configFile, nameFile, startFiles,
				goalFiles);
		this.add(settings, BorderLayout.NORTH);
		this.add(data, BorderLayout.CENTER);
		this.add(generate, BorderLayout.SOUTH);
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
		this.setVisible(true);
		this.pack();
	}

}
